package com.yuqiao.read.design.decorator;

public class StarBazzCaffee {
    public static void main(String[] args) {
//        Beverage beverage = new Espresso();
//
//        System.out.println("des = [" + beverage.getDescription() + "]");
//        System.out.println("cost = [" + beverage.cost() + "]");
//        Beverage darkRoast = new DarkRoast();
//        darkRoast = new Mocha(darkRoast);//加点摩卡
//        darkRoast = new Mocha(darkRoast);//再家电摩卡
//        darkRoast = new Whip(darkRoast);//再家电奶泡
//        System.out.println("des = [" + darkRoast.getDescription() + "]");
//        System.out.println("cost = [" + darkRoast.cost() + "]");

        Beverage houseBlend = new HouseBlend();
        houseBlend = new Mocha(houseBlend);
        houseBlend = new Soy(houseBlend);
        houseBlend = new Whip(houseBlend);
//        System.out.println("des = [" + houseBlend.getDescription() + "]");
        System.out.println("cost = [" + houseBlend.cost() + "]");
    }
}
